package com.ccb.sc.goods.enums;

import com.baomidou.mybatisplus.annotation.IEnum;

public enum GoodsType implements IEnum<Integer> {
    /**
     * 审核状态
     */
    NEW_STOCK(1, "新品"),
    HOT(2, "人气"),
    ;

    private int value;
    private String desc;

    GoodsType(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    @Override
    public Integer getValue() {
        return this.value;
    }

    public static GoodsType getByValue(int value) {
        for (GoodsType goodsType : GoodsType.values()) {
            if (goodsType.getValue() == value) {
                return goodsType;
            }
        }
        return null;
    }
}
